java_library(
    name = "processor",
    srcs = glob(["src/main/**/*.java"]),
    deps = [
        "//host-module/annotations",
        "//wasm",
        "@javaparser//javaparser-core",
    ],
)

CLASS_PREFIX = "com.dylibso.chicory.experimental.hostmodule.processor."

java_plugin(
    name = "HostModuleProcessor",
    generates_api = True,
    processor_class = CLASS_PREFIX + "HostModuleProcessor",
    visibility = ["//visibility:public"],
    deps = [":processor"],
)

java_plugin(
    name = "WasmModuleProcessor",
    generates_api = True,
    processor_class = CLASS_PREFIX + "WasmModuleProcessor",
    visibility = ["//visibility:public"],
    deps = [":processor"],
)
